<?php
// print_r($_SERVER);exit;

function is_HTTPS(){  //判断是不是https
    if(!isset($_SERVER['HTTPS']))  return FALSE;  

    if($_SERVER['HTTPS'] === 1){  //Apache  
        return TRUE;  
    }elseif($_SERVER['HTTPS'] === 'on'){ //IIS  
        return TRUE;  
    }elseif($_SERVER['SERVER_PORT'] == 443){ //其他  
        return TRUE;  
    }  
    return FALSE;  
}  

// 判断是否是https
if(!is_HTTPS())
{
	header('https://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
}


error_reporting(E_ERROR | E_PARSE);

require __DIR__ . '/../vendor/autoload.php';

$app = new app\hejiang\Application();
$app->run();